package com.inmobi.re.configs;

import android.content.Context;
import com.inmobi.commons.cache.CacheController;
import com.inmobi.commons.cache.CacheController.Validator;
import com.inmobi.commons.cache.ProductConfig;
import com.inmobi.commons.internal.CommonsException;
import com.inmobi.commons.internal.InternalSDKUtil;
import com.inmobi.commons.internal.Log;
import com.inmobi.commons.uid.UIDUtil;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONObject;

public class Initializer
{
  public static final String PRODUCT_MRAID = "mraid";
  public static final String PRODUCT_RENDERING = "rendering";
  private static Context a = null;
  private static Map<String, String> b = new HashMap();
  private static ConfigParams c = new ConfigParams();
  private static CacheController.Validator d = new a();

  static String a(String paramString)
  {
    c(a);
    try
    {
      JSONObject localJSONObject1 = new JSONObject(paramString);
      try
      {
        JSONObject localJSONObject6 = localJSONObject1.getJSONObject("common");
        localJSONObject2 = localJSONObject6;
      }
      catch (Exception localException1)
      {
        try
        {
          while (true)
          {
            JSONObject localJSONObject5 = localJSONObject1.getJSONObject("AND");
            localJSONObject3 = localJSONObject5;
            JSONObject localJSONObject4 = InternalSDKUtil.populateToNewJSON(localJSONObject3, localJSONObject2, true);
            c.setFromJSON(localJSONObject4);
            return c.toJSON().toString();
            localException1 = localException1;
            JSONObject localJSONObject2 = new JSONObject();
          }
        }
        catch (Exception localException3)
        {
          while (true)
            JSONObject localJSONObject3 = new JSONObject();
        }
      }
    }
    catch (Exception localException2)
    {
      Log.debug("IMRE_3.7.0", "Config couldn't be parsed", localException2);
    }
    return null;
  }

  private static void a(Context paramContext)
  {
    if ((paramContext != null) && (a == null))
      if (a == null);
    while ((a != null) || (paramContext != null))
    {
      return;
      a = paramContext;
      c(paramContext);
      try
      {
        a(CacheController.getConfig("rendering", paramContext, b, d).getData());
        return;
      }
      catch (CommonsException localCommonsException)
      {
        return;
      }
    }
    throw new NullPointerException();
  }

  private static void b(Context paramContext)
  {
    a(paramContext);
    try
    {
      CacheController.getConfig("rendering", paramContext, b, d);
      return;
    }
    catch (Exception localException)
    {
    }
  }

  private static void c(Context paramContext)
  {
    b = UIDUtil.getMap(a, c.getUID());
  }

  public static ConfigParams getConfigParams(Context paramContext)
  {
    b(paramContext);
    return c;
  }

  public static String getMRAIDString()
  {
    try
    {
      String str = CacheController.getConfig("mraid", a, b, new a()).getData();
      if ((str != null) && (str != ""))
        return str;
    }
    catch (Exception localException)
    {
    }
    return "var EventListeners=function(e){this.event=e;this.count=0;var t={};this.add=function(e){var n=String(e);if(!t[n]){t[n]=e;this.count++}};this.remove=function(e){var n=String(e);if(t[n]){t[n]=null;delete t[n];this.count--;return true}else{return false}};this.removeAll=function(){for(var e in t)this.remove(t[e])};this.broadcast=function(e){for(var n in t){t[n].apply({},e)}};this.toString=function(){var n=[e,\":\"];for(var r in t)n.push(\"|\",r,\"|\");return n.join(\"\")}};var InmobiObj=function(){this.listeners=[];this.addEventListener=function(e,t){try{if(typeof t!=\"undefined\"&&t!=null&&typeof e!=\"undefined\"&&e!=null){var n=this.listeners;if(!n[e]){n[e]=new EventListeners}n[e].add(t)}}catch(r){this.log(r)}if(\"micIntensityChange\"==e){mraidview.registerMicListener()}};this.removeEventListener=function(e,t){if(typeof t!=\"undefined\"&&t!=null&&typeof e!=\"undefined\"&&e!=null){var n=this.listeners;if(n[e]){n[e].remove(t)}if(\"micIntensityChange\"==e){if(n[e].count==0)mraidview.unRegisterMicListener()}}};this.broadcastEvent=function(e){if(typeof e!=\"undefined\"&&e!=null){var t=new Array(arguments.length);for(var n=0;n<arguments.length;n++){t[n]=arguments[n]}var e=t.shift();try{if(this.listeners[e]){this.listeners[e].broadcast(t)}}catch(r){}}}};(function(){var mraidview=window.mraidview={};var listeners={};var commandQueue=[];var activeCommand=false;mraidview.fireGalleryImageSelectedEvent=function(e,t,n){var r=new Image;var i=\"data:image/jpeg;base64,\"+e;r.src=i;r.width=t;r.height=n;window.mraid.broadcastEvent(\"galleryImageSelected\",r);return\"OK\"};mraidview.fireCameraPictureCatpturedEvent=function(e,t,n){var r=new Image;var i=\"data:image/jpeg;base64,\"+e;r.src=i;r.width=t;r.height=n;window.mraid.broadcastEvent(\"cameraPictureCaptured\",r);return\"OK\"};mraidview.firePostStatusEvent=function(e){window.mraid.broadcastEvent(\"postStatus\",e);return\"OK\"};mraidview.fireMediaTrackingEvent=function(e,t){var n={};n.name=e;var r=\"inmobi_media_\"+e;if(typeof t!=\"undefined\"&&t!=null&&t!=\"\"){r=r+\"_\"+t}window.mraid.broadcastEvent(r,evt);return\"OK\"};mraidview.fireMediaErrorEvent=function(e,t){var n={};n.name=\"error\";n.code=t;var r=\"inmobi_media_\"+n.name;if(typeof e!=\"undefined\"&&e!=null&&e!=\"\"){r=r+\"_\"+e}window.mraid.broadcastEvent(r,n);return\"OK\"};mraidview.fireMediaTimeUpdateEvent=function(e,t,n){var r={};r.name=\"timeupdate\";r.target={};r.target.currentTime=t;r.target.duration=n;var i=\"inmobi_media_\"+r.name;if(typeof e!=\"undefined\"&&e!=null&&e!=\"\"){i=i+\"_\"+e}window.mraid.broadcastEvent(i,evt);return\"OK\"};mraidview.fireMediaCloseEvent=function(e,t,n){var r={};r.name=\"close\";r.viaUserInteraction=t;r.target={};r.target.currentTime=n;var i=\"inmobi_media_\"+r.name;if(typeof e!=\"undefined\"&&e!=null&&e!=\"\"){i=i+\"_\"+e}window.mraid.broadcastEvent(i,evt);return\"OK\"};mraidview.fireMediaVolumeChangeEvent=function(e,t,n){var r={};r.name=\"volumechange\";r.target={};r.target.volume=t;r.target.muted=n;var i=\"inmobi_media_\"+r.name;if(typeof e!=\"undefined\"&&e!=null&&e!=\"\"){i=i+\"_\"+e}window.mraid.broadcastEvent(i,evt);return\"OK\"};mraidview.showAlert=function(e){utilityController.showAlert(e)};mraidview.zeroPad=function(e){var t=\"\";if(e<10){t+=\"0\"}t+=e;return t};mraidview.useCustomClose=function(e){try{displayController.useCustomClose(e)}catch(t){mraidview.showAlert(\"use CustomClose: \"+t)}};mraidview.close=function(){try{displayController.close()}catch(e){mraidview.showAlert(\"close: \"+e)}};mraidview.stackCommands=function(command,isExpand){if(!activeCommand){eval(command);if(isExpand){activeCommand=true}}else{commandQueue.push(command)}};mraidview.executeStack=function(){activeCommand=false;while(commandQueue.length>0){var cmd=commandQueue.shift();eval(cmd)}};mraidview.emptyStack=function(){while(commandQueue.length>0){commandQueue.shift()}};mraidview.expand=function(e){try{displayController.expand(e)}catch(t){mraidview.showAlert(\"executeNativeExpand: \"+t+\", URL = \"+e)}};mraidview.setExpandProperties=function(e){try{if(e){this.props=e}else{e=null}displayController.setExpandProperties(mraidview.stringify(e))}catch(t){mraidview.showAlert(\"executeNativesetExpandProperties: \"+t+\", props = \"+e)}};mraidview.getExpandProperties=function(){try{return eval(\"(\"+displayController.getExpandProperties()+\")\")}catch(e){mraidview.showAlert(\"getExpandProperties: \"+e)}};mraidview.setOrientationProperties=function(e){try{if(e){this.orientationProps=e}else{e=null}displayController.setOrientationProperties(mraidview.stringify(e))}catch(t){mraidview.showAlert(\"executeNativesetOrientationProperties: \"+t+\", props = \"+e)}};mraidview.resizeProps=null;mraidview.setResizeProperties=function(e){var t,n;try{t=parseInt(e.width);n=parseInt(e.height);if(isNaN(t)||isNaN(n)||t<1||n<1){throw\"Invalid\"}e.width=t;e.height=n;mraidview.resizeProps=e;displayController.setResizeProperties(mraidview.stringify(e))}catch(r){window.mraid.broadcastEvent(\"error\",\"Invalid properties.\",\"setResizeProperties\")}};mraidview.acceptAction=function(e){try{displayController.acceptAction(mraidview.stringify(e))}catch(t){mraidview.showAlert(\"acceptAction: \"+t+\", params = \"+e)}};mraidview.rejectAction=function(e){try{displayController.rejectAction(mraidview.stringify(e))}catch(t){mraidview.showAlert(\"rejectAction: \"+t+\", params = \"+e)}};mraidview.open=function(e){if(typeof e==\"undefined\")e=null;try{displayController.open(e)}catch(t){mraidview.showAlert(\"open: \"+t)}};mraidview.openExternal=function(e){try{utilityController.openExternal(e)}catch(t){mraidview.showAlert(\"openExternal: \"+t)}};mraidview.getScreenSize=function(){try{return eval(\"(\"+utilityController.getScreenSize()+\")\")}catch(e){mraidview.showAlert(\"getScreenSize: \"+e)}};mraidview.getMaxSize=function(){try{return eval(\"(\"+utilityController.getMaxSize()+\")\")}catch(e){mraidview.showAlert(\"getMaxSize: \"+e)}};mraidview.getCurrentPosition=function(){try{return eval(\"(\"+utilityController.getCurrentPosition()+\")\")}catch(e){mraidview.showAlert(\"getCurrentPosition: \"+e)}};mraidview.getDefaultPosition=function(){try{return eval(\"(\"+utilityController.getDefaultPosition()+\")\")}catch(e){mraidview.showAlert(\"getDefaultPosition: \"+e)}};mraidview.getState=function(){try{return String(displayController.getState())}catch(e){mraidview.showAlert(\"getState: \"+e)}};mraidview.getOrientation=function(){try{return String(displayController.getOrientation())}catch(e){mraidview.showAlert(\"getOrientation: \"+e)}};mraidview.isViewable=function(){try{return displayController.isViewable()}catch(e){mraidview.showAlert(\"isViewable: \"+e)}};mraidview.log=function(e){try{utilityController.log(e)}catch(t){mraidview.showAlert(\"log: \"+t)}};mraidview.getPlacementType=function(){return displayController.getPlacementType()};mraidview.asyncPing=function(e){try{utilityController.asyncPing(e)}catch(t){mraidview.showAlert(\"asyncPing: \"+t)}};mraidview.close=function(){try{displayController.close()}catch(e){mraidview.showAlert(\"close: \"+e)}};mraidview.makeCall=function(e){try{utilityController.makeCall(e)}catch(t){mraidview.showAlert(\"makeCall: \"+t)}};mraidview.sendMail=function(e,t,n){try{utilityController.sendMail(e,t,n)}catch(r){mraidview.showAlert(\"sendMail: \"+r)}};mraidview.sendSMS=function(e,t){try{utilityController.sendSMS(e,t)}catch(n){mraidview.showAlert(\"sendSMS: \"+n)}};mraidview.pauseAudio=function(e){try{var t=getPID(e);utilityController.pauseAudio(t)}catch(n){mraidview.showAlert(\"pauseAudio: \"+n)}};mraidview.muteAudio=function(e){try{var t=getPID(e);utilityController.muteAudio(t)}catch(n){mraidview.showAlert(\"muteAudio: \"+n)}};mraidview.unMuteAudio=function(e){try{var t=getPID(e);utilityController.unMuteAudio(t)}catch(n){mraidview.showAlert(\"unMuteAudio: \"+n)}};mraidview.isAudioMuted=function(e){try{var t=getPID(e);return utilityController.isAudioMuted(t)}catch(n){mraidview.showAlert(\"isAudioMuted: \"+n)}};mraidview.setAudioVolume=function(e,t){try{var n=getPID(e);t=parseInt(t);utilityController.setAudioVolume(n,t)}catch(r){mraidview.showAlert(\"setAudioVolume: \"+r)}};mraidview.getAudioVolume=function(e){try{var t=getPID(e);return utilityController.getAudioVolume(t)}catch(n){mraidview.showAlert(\"getAudioVolume: \"+n)}};mraidview.seekAudio=function(e,t){try{var n=getPID(e);t=parseInt(t);utilityController.seekAudio(n,t)}catch(r){mraidview.showAlert(\"seekAudio: \"+r)}};mraidview.playAudio=function(e,t){var n=true,r=false,i=\"normal\",s=\"normal\",o=true;var u=\"\";var a=getPID(t);if(e!=null)u=e;if(t!=null){if(typeof t.autoplay!=\"undefined\"&&t.autoplay===false){n=false}if(typeof t.loop!=\"undefined\"&&t.loop===true){r=true}if(typeof t.startStyle!=\"undefined\"&&t.startStyle!=null){i=t.startStyle}if(typeof t.stopStyle!=\"undefined\"&&t.stopStyle!=null){s=t.stopStyle}if(i==\"fullscreen\"){o=true}}try{utilityController.playAudio(u,n,o,r,i,s,a)}catch(f){mraidview.showAlert(\"playAudio: \"+f)}};mraidview.pauseVideo=function(e){try{var t=getPID(e);utilityController.pauseVideo(t)}catch(n){mraidview.showAlert(\"pauseVideo: \"+n)}};mraidview.closeVideo=function(e){try{var t=getPID(e);utilityController.closeVideo(t)}catch(n){mraidview.showAlert(\"closeVideo: \"+n)}};mraidview.hideVideo=function(e){try{var t=getPID(e);utilityController.hideVideo(t)}catch(n){mraidview.showAlert(\"hideVideo: \"+n)}};mraidview.showVideo=function(e){try{var t=getPID(e);utilityController.showVideo(t)}catch(n){mraidview.showAlert(\"showVideo: \"+n)}};mraidview.muteVideo=function(e){try{var t=getPID(e);utilityController.muteVideo(t)}catch(n){mraidview.showAlert(\"muteVideo: \"+n)}};mraidview.unMuteVideo=function(e){try{var t=getPID(e);utilityController.unMuteVideo(t)}catch(n){mraidview.showAlert(\"unMuteVideo: \"+n)}};mraidview.seekVideo=function(e,t){try{var n=getPID(e);t=parseInt(t);utilityController.seekVideo(n,t)}catch(r){mraidview.showAlert(\"seekVideo: \"+r)}};mraidview.isVideoMuted=function(e){try{var t=getPID(e);return utilityController.isVideoMuted(t)}catch(n){mraidview.showAlert(\"isVideoMuted: \"+n)}};mraidview.setVideoVolume=function(e,t){try{var n=getPID(e);t=parseInt(t);utilityController.setVideoVolume(n,t)}catch(r){mraidview.showAlert(\"setVideoVolume: \"+r)}};mraidview.getVideoVolume=function(e){try{var t=getPID(e);return utilityController.getVideoVolume(t)}catch(n){mraidview.showAlert(\"getVideoVolume: \"+n)}};mraidview.playVideo=function(e,t){var n=false,r=true,i=true,s=false,o=-99999,u=-99999,a=-99999,f=-99999,l=\"normal\",c=\"exit\";var h=\"\";var p=getPID(t);if(e!=null)h=e;if(t!=null){if(typeof t.audio!=\"undefined\"&&t.audio==\"muted\"){n=true}if(typeof t.autoplay!=\"undefined\"&&t.autoplay===false){r=false}if(typeof t.controls!=\"undefined\"&&t.controls===false){i=false}if(typeof t.loop!=\"undefined\"&&t.loop===true){s=true}if(typeof t.inline!=\"undefined\"&&t.inline!=null){o=t.inline.left;u=t.inline.top}if(typeof t.width!=\"undefined\"&&t.width!=null){a=t.width}else{}if(typeof t.height!=\"undefined\"&&t.height!=null){f=t.height}else{}if(typeof t.startStyle!=\"undefined\"&&t.startStyle!=null){l=t.startStyle}if(typeof t.stopStyle!=\"undefined\"&&t.stopStyle!=null){c=t.stopStyle}if(l==\"fullscreen\"){i=true}o=parseInt(o).toString();u=parseInt(u).toString();a=parseInt(a).toString();f=parseInt(f).toString()}try{utilityController.playVideo(h,n,r,i,s,o,u,a,f,l,c,p)}catch(d){mraidview.showAlert(\"playVideo: \"+d)}};mraidview.updateToPassbook=function(e){window.mraid.broadcastEvent(\"error\",\"Method not supported\",\"updateToPassbook\");mraidview.log(\"Method not supported\")};mraidview.stringify=function(e){if(typeof JSON===\"undefined\"){var t=\"\";var n=e.length;var r;if(typeof n==\"undefined\"){return mraidview.stringifyArg(e)}for(r=0;r<e.length;r++){if(r>0){t=t+\",\"}t=t+mraidview.stringifyArg(e[r])}t=t+\"]\";return t}else{return JSON.stringify(e)}};mraidview.stringifyArg=function(e){var t,n,r,s,o,u;n=typeof e;t=\"\";if(n===\"number\"||n===\"boolean\"){t=t+args}else if(e instanceof Array){t=t+\"[\"+e+\"]\"}else if(e instanceof Object){r=true;t=t+\"{\";for(s in e){if(e[s]!==null){if(!r){t=t+\",\"}t=t+'\"'+s+'\":';o=typeof e[s];if(o===\"number\"||o===\"boolean\"){t=t+e[s]}else if(typeof e[s]===\"function\"){t=t+'\"\"'}else if(e[s]instanceof Object){t=t+this.stringify(args[i][s])}else{t=t+'\"'+e[s]+'\"'}r=false}}t=t+\"}\"}else{u=e.replace(/\\\\/g,\"\\\\\\\\\");u=u.replace(/\"/g,'\\\\\"');t=t+'\"'+u+'\"'}mraidview.showAlert(\"json:\"+t);return t};getPID=function(e){var t=\"\";if(e!=null&&typeof e.id!=\"undefined\"&&e.id!=null){t=e.id}return t};var curOrientation;var firstCall=true;mraidview.getWindowOrientation=function(){var e=window.orientation;if(e<0)e+=360;return e};var checkOrientation=function(){if(firstCall||mraidview.getWindowOrientation()!==curOrientation){firstCall=false;curOrientation=mraidview.getWindowOrientation();displayController.onOrientationChange();mraid.broadcastEvent(\"orientationChange\",curOrientation)}};mraidview.registerOrientationListener=function(){curOrientation=mraidview.getWindowOrientation();window.addEventListener(\"resize\",checkOrientation,false);window.addEventListener(\"orientationchange\",checkOrientation,false)};mraidview.unRegisterOrientationListener=function(){window.removeEventListener(\"resize\",checkOrientation,false);window.removeEventListener(\"orientationchange\",checkOrientation,false)};mraidview.registerMicListener=function(){utilityController.registerMicListener()};mraidview.unRegisterMicListener=function(){utilityController.unRegisterMicListener()};mraidview.resize=function(){if(mraidview.resizeProps==null){window.mraid.broadcastEvent(\"error\",\"Valid resize dimensions must be provided before calling resize\",\"resize\");return}try{displayController.resize()}catch(e){mraidview.showAlert(\"resize called in bridge\")}};mraidview.vibrate=function(){utilityController.vibrate()};mraidview.takeCameraPicture=function(){utilityController.takeCameraPicture()};mraidview.getGalleryImage=function(){utilityController.getGalleryImage()};mraidview.createCalendarEvent=function(e){if(typeof e!=\"object\")window.mraid.broadcastEvent(\"error\",\"createCalendarEvent method expects parameter\",\"createCalendarEvent\");if(typeof e.start!=\"string\"||typeof e.end!=\"string\"){window.mraid.broadcastEvent(\"error\",\"createCalendarEvent method expects string parameters for start and end dates\",\"createCalendarEvent\");return}if(typeof e.location!=\"string\")e.location=\"\";if(typeof e.description!=\"string\")e.description=\"\";utilityController.createCalendarEvent(e.start,e.end,e.location,e.description)};mraidview.supports=function(e){console.log(\"bridge: supports\");if(typeof e!=\"string\"){window.mraid.broadcastEvent(\"error\",\"Supports method expects string parameter\",\"supports\")}else return utilityController.supportsFeature(e)!=\"false\"};mraidview.postToSocial=function(e,t,n,r){e=parseInt(e);if(isNaN(e)){window.mraid.broadcastEvent(\"error\",\"socialType must be an integer\",\"postToSocial\")}if(typeof t!=\"string\")t=\"\";if(typeof n!=\"string\")n=\"\";if(typeof r!=\"string\")r=\"\";utilityController.postToSocial(e,t,n,r)};mraidview.storePicture=function(e){console.log(\"bridge: storePicture\");if(typeof e!=\"string\"){window.mraid.broadcastEvent(\"error\",\"storePicture method expects url as string parameter\",\"storePicture\")}else{if(mraidview.supports(\"storePicture\")){if(!window.confirm(\"Do you want to download the file?\")){window.mraid.broadcastEvent(\"error\",\"Store picture on \"+e+\" was cancelled by user.\",\"storePicture\");return false}return utilityController.storePicture(e)}else window.mraid.broadcastEvent(\"error\",\"Store picture on \"+e+\" was cancelled because it is unsupported in this device/app.\",\"storePicture\")}};window.mraidview.registerOrientationListener()})();(function(){var e=window.mraid=new InmobiObj;var t=window.mraidview;var n={allowOrientationChange:true,forceOrientation:\"none\"};var r=function(e){var t=0;var n=e.length-1;while(t<e.length&&e[t]==\" \"){t++}while(n>t&&e[n]==\" \"){n-=1}return e.substring(t,n+1)};e.useCustomClose=function(e){t.useCustomClose(e)};e.close=function(){t.close()};e.getExpandProperties=function(){return t.getExpandProperties()};e.setExpandProperties=function(e){t.setExpandProperties(e)};e.getResizeProperties=function(){return t.getResizeProperties()};e.setResizeProperties=function(e){t.setResizeProperties(e)};e.getOrientationProperties=function(){return n};e.setOrientationProperties=function(e){n=e;t.setOrientationProperties(n)};e.expand=function(e){t.expand(e)};e.getMaxSize=function(){return t.getMaxSize()};e.getState=function(){return t.getState()};e.getOrientation=function(){return t.getOrientation()};e.isViewable=function(){return t.isViewable()};e.open=function(e){if(!e){this.broadcastEvent(\"error\",\"URL is required.\",\"open\")}else{t.open(e)}};e.resize=function(){t.resize()};e.log=function(e){if(!e){this.broadcastEvent(\"error\",\"message is required.\",\"log\")}else{t.log(e)}};e.getVersion=function(){return\"2.0\"};e.getInMobiAIVersion=function(){return 1.2};e.getPlacementType=function(){return t.getPlacementType()};e.asyncPing=function(e){if(typeof e!=\"string\"){this.broadcastEvent(\"error\",\"URL is required.\",\"asyncPing\")}else{t.asyncPing(e)}};e.makeCall=function(e){if(!e||typeof e!=\"string\"||r(e).length==0){this.broadcastEvent(\"error\",\"Request must provide a number to call.\",\"makeCall\")}else{t.makeCall(e)}};e.sendMail=function(e,n,i){if(!e||typeof e!=\"string\"||r(e).length==0){this.broadcastEvent(\"error\",\"Request must specify a recipient.\",\"sendMail\")}else{t.sendMail(e,n,i)}};e.sendSMS=function(e,n){if(!e||typeof e!=\"string\"||r(e).length==0){this.broadcastEvent(\"error\",\"Request must specify a recipient.\",\"sendSMS\")}else{t.sendSMS(e,n)}};e.playAudio=function(e,n){if(typeof n==\"undefined\"||n==null){if(typeof e==\"string\"){t.playAudio(e,null)}else if(typeof e==\"object\"){t.playAudio(null,e)}else{t.playAudio(null,null)}}else{t.playAudio(e,n)}};e.playVideo=function(e,n){if(typeof n==\"undefined\"||n==null){if(typeof e==\"string\"){t.playVideo(e,null)}else if(typeof e==\"object\"){t.playVideo(null,e)}else{t.playVideo(null,null)}}else{t.playVideo(e,n)}};e.pauseAudio=function(e){t.pauseAudio(e)};e.muteAudio=function(e){t.muteAudio(e)};e.unMuteAudio=function(e){t.unMuteAudio(e)};e.isAudioMuted=function(e){return t.isAudioMuted(e)};e.setAudioVolume=function(e){var n=e.volume;if(typeof n==\"undefined\"||n==null){this.broadcastEvent(\"error\",\"Request must specify a valid volume\",\"setAudioVolume\")}else if(n<0||n>100){this.broadcastEvent(\"error\",\"Request must specify a valid volume value in the range 0..100\",\"setAudioVolume\")}else{t.setAudioVolume(e,n)}};e.getAudioVolume=function(e){return t.getAudioVolume(e)};e.pauseVideo=function(e){t.pauseVideo(e)};e.closeVideo=function(e){t.closeVideo(e)};e.hideVideo=function(e){t.hideVideo(e)};e.showVideo=function(e){t.showVideo(e)};e.muteVideo=function(e){t.muteVideo(e)};e.unMuteVideo=function(e){t.unMuteVideo(e)};e.isVideoMuted=function(e){return t.isVideoMuted(e)};e.setVideoVolume=function(e){var n=e.volume;if(typeof n==\"undefined\"||n==null){this.broadcastEvent(\"error\",\"Request must specify a valid volume\",\"setVideoVolume\")}else if(n<0||n>100){this.broadcastEvent(\"error\",\"Request must specify a valid volume value in the range 0..100\",\"setVideoVolume\")}else{t.setVideoVolume(e,n)}};e.getVideoVolume=function(e){return t.getVideoVolume(e)};e.seekAudio=function(e){var n=e.time;if(typeof n==\"undefined\"||n==null){this.broadcastEvent(\"error\",\"Request must specify a valid time\",\"seekAudio\")}else if(n!=0){this.broadcastEvent(\"error\",\"Cannot seek audio other than 0\",\"seekAudio\")}else{t.seekAudio(e,n)}};e.seekVideo=function(e){var n=e.time;if(typeof n==\"undefined\"||n==null){this.broadcastEvent(\"error\",\"Request must specify a valid time\",\"seekVideo\")}else if(n!=0){this.broadcastEvent(\"error\",\"Cannot seek video other than 0\",\"seekVideo\")}else{t.seekVideo(e,n)}};e.openExternal=function(e){t.openExternal(e)};e.getScreenSize=function(){return t.getScreenSize()};e.getCurrentPosition=function(){return t.getCurrentPosition()};e.updateToPassbook=function(e){t.updateToPassbook(e)};e.acceptAction=function(e){t.acceptAction(e)};e.rejectAction=function(e){t.rejectAction(e)};e.storePicture=function(e){if(!e){this.broadcastEvent(\"error\",\"storePicture URL cannot be null\",\"storePicture\")}else{t.storePicture(e)}};e.vibrate=function(){t.vibrate()};e.takeCameraPicture=function(){t.takeCameraPicture()};e.getMicIntensity=function(){return t.getMicIntensity()};e.postToSocial=function(e,n,r,i){t.postToSocial(e,n,r,i)};e.createCalendarEvent=function(e){if(!e){this.broadcastEvent(\"error\",\"calendar event must be specified\",\"createCalendarEvent\")}else{t.createCalendarEvent(e)}};e.getPlatform=function(){return\"android\"}})();(function(){\"use strict\";var e=window._im_imaiBridge={ios:{}};var t={};e.broadcastEvent=function(){var e=new Array(arguments.length);for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}var n=e.shift();try{window.mraid.broadcastEvent(n,e)}catch(r){}};e.getPlatform=function(){return\"android\"};e.getPlatformVersion=function(){return imaiController.getPlatformVersion()};e.log=function(e){imaiController.log(e)};e.openEmbedded=function(e){imaiController.openEmbedded(e)};e.openExternal=function(e){imaiController.openExternal(e)};e.ping=function(e,t){imaiController.ping(e,t)};e.pingInWebView=function(e,t){imaiController.pingInWebView(e,t)};e.ios.openItunesProductView=function(e){this.broadcastEvent(\"error\",\"functionality not supported\",\"openItunesProductView\")};e.ios.updateToPassbook=function(e){this.broadcastEvent(\"error\",\"functionality not supported\",\"updateToPassbook\")}})();(function(){var e=window._im_imaiBridge;window._im_imai=new InmobiObj;window._im_imai.ios=new InmobiObj;var t=window._im_imai;t.matchString=function(e,t){if(typeof e!=\"string\"||e==null){return-1}if(t==null){return-1}var n=-1;try{n=e.indexOf(t)}catch(r){}return n};t.isHttpUrl=function(e){if(typeof e!=\"string\"||e==null){return false}if(t.matchString(e,\"http://\")==0){return true}else{if(t.matchString(e,\"https://\")==0){return true}else{return false}}};t.appendTapParams=function(e,n,r){if(typeof n==\"undefined\"||n==null){return e}if(typeof r==\"undefined\"||r==null){return e}if(t.isHttpUrl(e)){if(t.matchString(e,\"?\")==-1){e+=\"?\"+\"u-tap-o=\"+n+\",\"+r}else{e+=\"&\"+\"u-tap-o=\"+n+\",\"+r}}return e};t.performAdClick=function(e,n){n=n||event;if(typeof e==\"undefined\"||e==null){t.log(\" invalid config, nothing to process .\");this.broadcastEvent(\"error\",\"invalid config, nothing to process .\");return}var r=e.clickConfig;var i=e.landingConfig;if((typeof r==\"undefined\"||r==null)&&(typeof i==\"undefined\"||i==null)){t.log(\"click/landing config are invalid, Nothing to process .\");t.broadcastEvent(\"error\",\"click/landing config are invalid, Nothing to process .\");return}var s=null;var o=null;var u=null;var a=null;var f=null;var l=null;var c=null;if(typeof n!=\"undefined\"&&n!=null){a=n.screenX;f=n.screenY}if(typeof i==\"undefined\"||i==null){l=r.url;c=r.urlType}else if(typeof r==\"undefined\"||r==null){l=i.url;c=i.urlType}else{l=i.url;c=i.urlType;s=r.url;o=r.pingWV;u=r.fr}var h=t.getPlatform();try{if(typeof u!=\"boolean\"&&typeof u!=\"number\"||u==null){u=true}if(u<0||u>1){u=true}if(typeof o!=\"boolean\"&&typeof o!=\"number\"||o==null){o=true}if(o<0||o>1){o=true}if(typeof c!=\"number\"||c==null){c=0}s=t.appendTapParams(s,a,f);if(typeof s!=\"undefined\"&&s!=null){if(o==true){t.pingInWebView(s)}else{t.ping(s,u)}}else{t.log(\"clickurl provided is null.\")}if(typeof l!=\"undefined\"&&l!=null){if(typeof s==\"undefined\"||s==null){l=t.appendTapParams(l,a,f)}switch(c){case 1:{t.openEmbedded(l)}break;case 2:{if(h==\"ios\"){t.ios.openItunesProductView(l)}else{t.broadcastEvent(\"error\",\"Cannot process openItunesProductView for os\"+h)}}break;default:{t.openExternal(l)}}}else{t.log(\"Landing url provided is null.\")}}catch(p){t.log(\"Perform ad click exception.\"+p)}};t.getVersion=function(){return\"1.0\"};t.getPlatform=function(){return e.getPlatform()};t.getPlatformVersion=function(){return e.getPlatformVersion()};t.log=function(t){e.log(t)};t.openEmbedded=function(t){e.openEmbedded(t)};t.openExternal=function(t){e.openExternal(t)};t.ping=function(t,n){e.ping(t,n)};t.pingInWebView=function(t){e.pingInWebView(t)};t.ios.openItunesProductView=function(t){e.ios.openItunesProductView(t)}})()";
  }

  static final class a
    implements CacheController.Validator
  {
    public String validate(String paramString)
    {
      return paramString;
    }
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.inmobi.re.configs.Initializer
 * JD-Core Version:    0.6.2
 */